# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=filelight
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/utilities/filelight"
pkgdesc="An application to visualize the disk usage on your computer"
license="(GPL-2.0-only OR GPL-3.0-only) AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kxmlgui-dev kio-dev ki18n-dev kdoctools-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/filelight-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="62a8722f51b0aaec66ebdf5e409eea59419ed5a732a6dc3313a2ba567d4bb2da0c65aa45f2c59065304c5eb93d0c46c85f55fbda9e291be3482adf55ca7cb8ef  filelight-20.04.3.tar.xz"
